/*
 * Codé par: Tristan Gosselin
 * Commenté par: Tristan Gosselin
 * **************************
 * Classe d type JFrame
 * Contient l'écran principal de l'application
 */
package logicielrestaurant;

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;

public class EcranPrincipal extends javax.swing.JFrame {
    /**
     * Creates new form EcranPrincipal
     */
    public EcranPrincipal() {
        initComponents();
        // Set du formulaire pour qu'il soit plein écran
        addWindowListener(new WindowAdapter() 
        {
            public void windowOpened(WindowEvent e) 
            {
                setExtendedState(MAXIMIZED_BOTH);
            }
        }); 
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        label1 = new java.awt.Label();
        txtNumEmploye = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        panelButtons = new javax.swing.JPanel();
        cmdTable1 = new javax.swing.JButton();
        cmdTable2 = new javax.swing.JButton();
        cmdTable3 = new javax.swing.JButton();
        cmdTable4 = new javax.swing.JButton();
        cmdTable5 = new javax.swing.JButton();
        cmdTable6 = new javax.swing.JButton();
        cmdTable7 = new javax.swing.JButton();
        cmdTable8 = new javax.swing.JButton();
        cmdTable9 = new javax.swing.JButton();
        cmdTable10 = new javax.swing.JButton();
        cmdTable11 = new javax.swing.JButton();
        cmdTable12 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setBackground(new java.awt.Color(120, 30, 7));
        addWindowFocusListener(new java.awt.event.WindowFocusListener() {
            public void windowLostFocus(java.awt.event.WindowEvent evt) {
            }
            public void windowGainedFocus(java.awt.event.WindowEvent evt) {
                formWindowGainedFocus(evt);
            }
        });

        label1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        label1.setText("Restaurant Chez Pauline");

        txtNumEmploye.setText("10");

        jLabel1.setText("Entrez votre numéro d'employé:");

        panelButtons.setLayout(new java.awt.GridBagLayout());

        cmdTable1.setBackground(new java.awt.Color(0, 255, 0));
        cmdTable1.setText("1");
        cmdTable1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        cmdTable1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdTable1ActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.gridheight = 2;
        gridBagConstraints.ipadx = 54;
        gridBagConstraints.ipady = 103;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(48, 53, 0, 0);
        panelButtons.add(cmdTable1, gridBagConstraints);

        cmdTable2.setBackground(new java.awt.Color(0, 255, 0));
        cmdTable2.setText("2");
        cmdTable2.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        cmdTable2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdTable2ActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.gridheight = 2;
        gridBagConstraints.ipadx = 59;
        gridBagConstraints.ipady = 103;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(48, 92, 0, 0);
        panelButtons.add(cmdTable2, gridBagConstraints);

        cmdTable3.setBackground(new java.awt.Color(0, 255, 0));
        cmdTable3.setText("3");
        cmdTable3.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        cmdTable3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdTable3ActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.ipadx = 160;
        gridBagConstraints.ipady = 56;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(83, 56, 0, 0);
        panelButtons.add(cmdTable3, gridBagConstraints);

        cmdTable4.setBackground(new java.awt.Color(0, 255, 0));
        cmdTable4.setText("4");
        cmdTable4.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        cmdTable4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdTable4ActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 5;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.gridheight = 2;
        gridBagConstraints.ipadx = 56;
        gridBagConstraints.ipady = 103;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(48, 85, 0, 49);
        panelButtons.add(cmdTable4, gridBagConstraints);

        cmdTable5.setBackground(new java.awt.Color(0, 255, 0));
        cmdTable5.setText("5");
        cmdTable5.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        cmdTable5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdTable5ActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.gridheight = 2;
        gridBagConstraints.ipadx = 54;
        gridBagConstraints.ipady = 103;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(29, 53, 0, 0);
        panelButtons.add(cmdTable5, gridBagConstraints);

        cmdTable6.setBackground(new java.awt.Color(0, 255, 0));
        cmdTable6.setText("6");
        cmdTable6.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        cmdTable6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdTable6ActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.gridheight = 2;
        gridBagConstraints.ipadx = 59;
        gridBagConstraints.ipady = 103;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(29, 92, 0, 0);
        panelButtons.add(cmdTable6, gridBagConstraints);

        cmdTable7.setBackground(new java.awt.Color(0, 255, 0));
        cmdTable7.setText("7");
        cmdTable7.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        cmdTable7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdTable7ActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.ipadx = 160;
        gridBagConstraints.ipady = 63;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(59, 56, 0, 0);
        panelButtons.add(cmdTable7, gridBagConstraints);

        cmdTable8.setBackground(new java.awt.Color(0, 255, 0));
        cmdTable8.setText("8");
        cmdTable8.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        cmdTable8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdTable8ActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 5;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.gridheight = 2;
        gridBagConstraints.ipadx = 56;
        gridBagConstraints.ipady = 103;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(29, 85, 0, 49);
        panelButtons.add(cmdTable8, gridBagConstraints);

        cmdTable9.setBackground(new java.awt.Color(0, 255, 0));
        cmdTable9.setText("9");
        cmdTable9.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        cmdTable9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdTable9ActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 7;
        gridBagConstraints.ipadx = 54;
        gridBagConstraints.ipady = 103;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(22, 53, 0, 0);
        panelButtons.add(cmdTable9, gridBagConstraints);

        cmdTable10.setBackground(new java.awt.Color(0, 255, 0));
        cmdTable10.setText("10");
        cmdTable10.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        cmdTable10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdTable10ActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 7;
        gridBagConstraints.ipadx = 53;
        gridBagConstraints.ipady = 103;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(22, 92, 0, 0);
        panelButtons.add(cmdTable10, gridBagConstraints);

        cmdTable11.setBackground(new java.awt.Color(0, 255, 0));
        cmdTable11.setText("11");
        cmdTable11.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        cmdTable11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdTable11ActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 7;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.gridheight = 2;
        gridBagConstraints.ipadx = 154;
        gridBagConstraints.ipady = 61;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(70, 56, 30, 0);
        panelButtons.add(cmdTable11, gridBagConstraints);

        cmdTable12.setBackground(new java.awt.Color(0, 255, 0));
        cmdTable12.setText("12");
        cmdTable12.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        cmdTable12.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdTable12ActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 5;
        gridBagConstraints.gridy = 7;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 103;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(22, 85, 0, 49);
        panelButtons.add(cmdTable12, gridBagConstraints);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(txtNumEmploye, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(170, 170, 170))
            .addGroup(layout.createSequentialGroup()
                .addGap(610, 610, 610)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(62, 62, 62))
            .addGroup(layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addComponent(panelButtons, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 8, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(146, 146, 146)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(txtNumEmploye, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(panelButtons, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /// **********************************************************************************************************************
    /// ************* DÉBUT du block de code qui appel la fonction TraiterBouton quand on clique sur un bouton ***************
    /// **********************************************************************************************************************
    private void cmdTable4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdTable4ActionPerformed
        // TODO add your handling code here:
        TraiterBouton(evt);
    }//GEN-LAST:event_cmdTable4ActionPerformed

    private void cmdTable8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdTable8ActionPerformed
        // TODO add your handling code here:
        TraiterBouton(evt);
    }//GEN-LAST:event_cmdTable8ActionPerformed

    private void cmdTable6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdTable6ActionPerformed
        // TODO add your handling code here:
        TraiterBouton(evt);

    }//GEN-LAST:event_cmdTable6ActionPerformed

    private void cmdTable1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdTable1ActionPerformed
        // TODO add your handling code here:
        TraiterBouton(evt);
    }//GEN-LAST:event_cmdTable1ActionPerformed

    private void cmdTable5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdTable5ActionPerformed
        // TODO add your handling code here:
        TraiterBouton(evt);
    }//GEN-LAST:event_cmdTable5ActionPerformed

    private void cmdTable12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdTable12ActionPerformed
        // TODO add your handling code here:
        TraiterBouton(evt);
    }//GEN-LAST:event_cmdTable12ActionPerformed

    private void cmdTable9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdTable9ActionPerformed
        // TODO add your handling code here:
        TraiterBouton(evt);
    }//GEN-LAST:event_cmdTable9ActionPerformed

    private void cmdTable3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdTable3ActionPerformed
        // TODO add your handling code here:
        TraiterBouton(evt);

    }//GEN-LAST:event_cmdTable3ActionPerformed

    private void cmdTable10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdTable10ActionPerformed
        // TODO add your handling code here:
        TraiterBouton(evt);
    }//GEN-LAST:event_cmdTable10ActionPerformed

    private void cmdTable11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdTable11ActionPerformed
        // TODO add your handling code here:
        TraiterBouton(evt);
    }//GEN-LAST:event_cmdTable11ActionPerformed

    private void cmdTable7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdTable7ActionPerformed
        // TODO add your handling code here:
        TraiterBouton(evt);
    }//GEN-LAST:event_cmdTable7ActionPerformed

    private void cmdTable2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdTable2ActionPerformed
        // TODO add your handling code here:
        TraiterBouton(evt);
    }//GEN-LAST:event_cmdTable2ActionPerformed
    /// **********************************************************************************************************************
    /// ************* FIN du block de code qui appel la fonction TraiterBouton quand on clique sur un bouton *****************
    /// **********************************************************************************************************************
    
    ///
    /// Événement lorsque l'écran principal obtient le focus
    ///
    private void formWindowGainedFocus(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowGainedFocus
        // On passe au travers de tous les controles du panneau PanelButtons
        for( int i = 0; i < this.panelButtons.getComponentCount();i++)
        {
            // Si on trouve un bouton
            if(this.panelButtons.getComponent(i) instanceof JButton)  
              {  
                // On met le bouton trouvé dans une variable JButton  
                JButton j = (JButton)this.panelButtons.getComponent(i);
                // get de la table associée, avec le texte du du bouton qui est le numéro de la table
                Table t = DbConnection.getTable(Integer.parseInt(j.getText()));
                // On change la couleur du bouton de la table selon son status
                if (t.getOccupe() == 1)
                {
                    j.setBackground(Color.red);
                    if (t.getPret() == 1)
                    {
                        j.setBackground(Color.yellow);
                    }
                }
                else
                {
                    j.setBackground(Color.green);
                }
            }
        }
        // On repainture le panneau vaec la nouvelle couleur des boutons
        this.validate();
        this.repaint();
    }//GEN-LAST:event_formWindowGainedFocus

    ///
    /// Méthode qui est apellée losr d'un click sur une table
    ///
    private void TraiterBouton(java.awt.event.ActionEvent e){
        // Véréfication qu'un numéro de serveur est présent
        if (this.txtNumEmploye.getText() != "")
        {
            // Get du serveur
            Serveur s = DbConnection.getServeur(Integer.parseInt(this.txtNumEmploye.getText()));
            // Si le serveur est trouvé
            if (s.getId() != 0)
            {
                // Trouve le bouton qui est la source du click
                JButton boutonSource =  (JButton)e.getSource();
                boutonSource.getText();
                // Création d'un objet table contenant les infos de la table cliquée
                Table t = DbConnection.getTable(Integer.parseInt(boutonSource.getText()));
                // OUverture du formulaire IncrireCommande avec la table en paramètre
                new InscrireCommande(t, s).setVisible(true); 
            }
            else
                JOptionPane.showMessageDialog(null, "Le numéro que vous avez entré n'est pas valide");
        }
        else
            JOptionPane.showMessageDialog(null, "Veuillez entrer votre numéro d'employé");
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(EcranPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(EcranPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(EcranPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(EcranPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new EcranPrincipal().setVisible(true); 
              
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton cmdTable1;
    private javax.swing.JButton cmdTable10;
    private javax.swing.JButton cmdTable11;
    private javax.swing.JButton cmdTable12;
    private javax.swing.JButton cmdTable2;
    private javax.swing.JButton cmdTable3;
    private javax.swing.JButton cmdTable4;
    private javax.swing.JButton cmdTable5;
    private javax.swing.JButton cmdTable6;
    private javax.swing.JButton cmdTable7;
    private javax.swing.JButton cmdTable8;
    private javax.swing.JButton cmdTable9;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JPanel jPanel1;
    private java.awt.Label label1;
    private javax.swing.JPanel panelButtons;
    private javax.swing.JTextField txtNumEmploye;
    // End of variables declaration//GEN-END:variables
}
